{template 'common/header'}
	<div class="panel panel-warning">
		<div class="panel-heading">首页参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="indextitle" name="indextitle" placeholder="建议5字以内" value="{$o['indextitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">服务列表参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="servicelisttitle" name="servicelisttitle" placeholder="建议5字以内" value="{$o['servicelisttitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">服务详情页参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="servicedetailstitle" name="servicedetailstitle" placeholder="建议5字以内" value="{$o['servicedetailstitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内,暂时舍弃</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">技师列表页参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="techlisttitle" name="techlisttitle" placeholder="建议5字以内" value="{$o['techlisttitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">技师详情页参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="techdetailstitle" name="techdetailstitle" placeholder="建议5字以内" value="{$o['techdetailstitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">个人中心参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="personaltitle" name="personaltitle" placeholder="建议5字以内" value="{$o['personaltitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">我的预约参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="mybooktitle" name="mybooktitle" placeholder="建议5字以内" value="{$o['mybooktitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>

		<div class="panel-heading">关于我们</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="abouttitle" name="abouttitle" placeholder="建议5字以内" value="{$o['abouttitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>			

		<div class="panel-heading">卡券中心</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
				<div class="form-group">
		        	<label class="col-sm-3 control-label">页面标题</label>
			        <div class="col-sm-6">
						<input class="form-control required" type="txet" id="cardtitle" name="cardtitle" placeholder="建议5字以内" value="{$o['cardtitle']}">
						<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
				    </div>
		    	</div>
			</div>
		</div>						

		<div class="panel-heading">预约中心参数</div>
		<div class="panel-body">
			<div class="form-horizontal"> 
			<div class="form-group">
	        	<label class="col-sm-3 control-label">页面标题</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="booktitle" name="booktitle" placeholder="建议5字以内" value="{$o['booktitle']}">
					<span class="help-block">&nbsp;&nbsp;建议5字以内</span>
			    </div>
	    	</div>

			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:姓名</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Tname" name="book_Tname" placeholder="4字以内" value="{$o['book_Tname']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：姓名</span>
			    </div>
	    	</div>

			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:联系电话</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Tphone" name="book_Tphone" placeholder="4字以内" value="{$o['book_Tphone']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：联系电话</span>
			    </div>
	    	</div>

			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:联系地址</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Taddress" name="book_Taddress" placeholder="4字以内" value="{$o['book_Taddress']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：联系地址</span>
			    </div>
	    	</div>	    	

			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:服务项目</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Tservice" name="book_Tservice" placeholder="4字以内" value="{$o['book_Tservice']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：服务项目</span>
			    </div>
	    	</div>

			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:选择技师</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Ttech" name="book_Ttech" placeholder="4字以内" value="{$o['book_Ttech']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：选择技师</span>
			    </div>
	    	</div>
			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:日期时间</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Tdate" name="book_Tdate" placeholder="4字以内" value="{$o['book_Tdate']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：日期时间</span>
			    </div>
	    	</div>

			<div class="form-group">
	        	<label class="col-sm-3 control-label">替换表单名:优惠券</label>
		        <div class="col-sm-6">
					<input class="form-control required" type="txet" id="book_Tcard" name="book_Tcard" placeholder="4字以内" value="{$o['book_Tcard']}">
					<span class="help-block">&nbsp;&nbsp;4字以内，不填则默认为：优惠券</span>
			    </div>
	    	</div>	    			    		    	

		    <div class="form-group">
		        <label class="col-sm-3 control-label">是否开启收集地址字段</label>
		        <div class="col-sm-6">
		            <div id="openaddress" class="miiswitch" data-on="warning">
					    <input type="checkbox" checked />
					    <input type="hidden" name="book_hideaddress"  value="{if $o['hideaddress']=='-1'}-1{else}1{/if}">
					</div>
		        </div>
		    </div>

		    <div class="form-group">
		        <label class="col-sm-3 control-label">是否开启优惠券字段</label>
		        <div class="col-sm-6">
		            <div id="opencard" class="miiswitch" data-on="warning">
					    <input type="checkbox" checked />
					    <input type="hidden" name="book_hidecard"  value="{if $o['hidecard']=='-1'}-1{else}1{/if}">
					</div>
		        </div>
		    </div>

			</div>
		</div>	

		<div class="panel-heading">所有参数对照均以官方演示站为标准,以上值不填则系统默认</div>
	</div>
	<button type="button" id="save_" class="btn btn-info" style="display: block; margin-left: auto;margin-right: auto;">提交保存</button>	
	<br>
	<br>
<link rel="stylesheet" href="{MODULE_URL}public/css/bootstrapSwitch.css">
<script src="{MODULE_URL}public/js/switch.js"></script> 	
<style type="text/css">.right-content {padding: 0px;}</style> 
<link rel="stylesheet" href="{MODULE_URL}public/css/Toast.css">
<script src="{MODULE_URL}public/js/Toast.js"></script>  
<script>
	$('#openaddress').on('switch-change', function (e, data) {
    var $el = $(data.el)
      , value = data.value;
    console.log($el,value);
    if(value){
    	$("input[name='book_hideaddress']").val('1');
    	return false;
    }else{
    	$("input[name='book_hideaddress']").val('-1');
    	return false;    	
    	}
	});
	{if $o['book_hideaddress']=='-1'}
	$('#openaddress').bootstrapSwitch('setState', false);
	{else}
	$('#openaddress').bootstrapSwitch('setState', true);
	{/if}

	$('#opencard').on('switch-change', function (e, data) {
    var $el = $(data.el)
      , value = data.value;
    console.log($el,value);
    if(value){
    	$("input[name='book_hidecard']").val('1');
    	return false;
    }else{
    	$("input[name='book_hidecard']").val('-1');
    	return false;    	
    	}
	});
	{if $o['book_hidecard']=='-1'}
	$('#opencard').bootstrapSwitch('setState', false);
	{else}
	$('#opencard').bootstrapSwitch('setState', true);
	{/if}
</script>
	
<script type="text/javascript">
	$("#save_").on("click",function(){
		var indextitle = $.trim($('#indextitle').val());
		var servicelisttitle  = $.trim($('#servicelisttitle').val());
		var servicedetailstitle = $.trim($('#servicedetailstitle').val());
		var techlisttitle  = $.trim($('#techlisttitle').val());
		var techdetailstitle = $.trim($('#techdetailstitle').val());
		var personaltitle = $.trim($('#personaltitle').val());
		var mybooktitle  = $.trim($('#mybooktitle').val());
		var cardtitle = $.trim($('#cardtitle').val());
		var abouttitle = $.trim($('#abouttitle').val());
		var booktitle = $.trim($('#booktitle').val());
		var book_Tname = $.trim($('#book_Tname').val());
		var book_Tphone = $.trim($('#book_Tphone').val());
		var book_Taddress = $.trim($('#book_Taddress').val());
		var book_Tservice = $.trim($('#book_Tservice').val());
		var book_Ttech = $.trim($('#book_Ttech').val());
		var book_Tdate = $.trim($('#book_Tdate').val());
		var book_Tcard = $.trim($('#book_Tcard').val());
		var book_hideaddress = $.trim($("input[name='book_hideaddress']").val());
		var book_hidecard  = $.trim($("input[name='book_hidecard']").val());
		if(book_Tname !='' && book_Tname.length>4){
			mqToast({type:1,context:"替换表单名:姓名 应在4字以内"});
			return false;			
		}
		if(book_Tphone !='' && book_Tphone.length>4){
			mqToast({type:1,context:"替换表单名:联系电话 应在4字以内"});
			return false;			
		}
		if(book_Taddress !='' && book_Taddress.length>4){
			mqToast({type:1,context:"替换表单名:联系地址 应在4字以内"});
			return false;			
		}
		if(book_Tservice !='' && book_Tservice.length>4){
			mqToast({type:1,context:"替换表单名:服务项目 应在4字以内"});
			return false;			
		}
		if(book_Ttech !='' && book_Ttech.length>4){
			mqToast({type:1,context:"替换表单名:选择技师 应在4字以内"});
			return false;			
		}
		if(book_Tdate != '' && book_Tdate.length>4){
			mqToast({type:1,context:"替换表单名:日期时间 应在4字以内"});
			return false;			
		}
		if(book_Tcard !='' && book_Tcard.length>4){
			mqToast({type:1,context:"替换表单名:优惠券 应在4字以内"});
			return false;
		}
		$.ajax({
			url:"{php echo $this->createWebUrl('save_pageinfo');}&version_id="+"{$_GPC['version_id']}",
			data:{indextitle:indextitle,servicelisttitle:servicelisttitle,servicedetailstitle:servicedetailstitle,techlisttitle:techlisttitle,techdetailstitle:techdetailstitle,personaltitle:personaltitle,mybooktitle:mybooktitle,cardtitle:cardtitle,abouttitle:abouttitle,booktitle:booktitle,book_Tname:book_Tname,book_Tphone:book_Tphone,book_Taddress:book_Taddress,book_Tservice:book_Tservice,book_Ttech:book_Ttech,book_Tdate:book_Tdate,book_Tcard:book_Tcard,book_hideaddress:book_hideaddress,book_hidecard:book_hidecard},
			dataType:"json",
			type:"post",
			success:function(res){
				if(res.status==1){
					mqToast({type:1,context:res.msg});
					return false;					
				}else{
					mqToast({type:1,context:res.msg});
					return false;					
				}
			}
		});

	})	


</script>


{template 'common/footer'}